<?
	require_once('includeR.php');
	$results = $conn->query("SELECT * FROM Registrations");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index Page</title>
</head>

<body>
<?=$conn->connect_error ?>
	<table>
    	<? while($rs = $results->fetch_assoc()) { ?>  <!-- While starts here -->
    	<tr>
        	<td>
            	<a href="viewR.php?id=<?=$rs['id']?>">View</a>
                <a href="editR.php?id=<?=$rs['id']?>">Edit</a>
                <a href="deleteR.php?id=<?=$rs['id']?>">Delete</a>
            </td>
            <td><?=$rs['UserId'] ?></td>
            <td><?=$rs['CourseId'] ?></td>
            <td><?=$rs['Grade'] ?></td>
        </tr>
        <? } ?> <!-- While ends here -->
    </table>
    
</body>
</html>
<? $conn->close(); ?>